var tont=document.querySelector(".tont");
var to=document.querySelector(".tont .huix");


to.onclick=function () {
    tont.style.display="none";
}

var swiper = new Swiper('.swiper-container', {
    spaceBetween: 30,
    effect: 'fade',
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
});


var an=document.querySelectorAll(".yanse ul li");
console.log(an);
var lunbo=document.querySelectorAll(".col-md-6 .swiper-container");
console.log(lunbo);
var dt=document.querySelectorAll(".zongone span")
for (var i=0; i< an.length;i++){
    an[i].index = i;
    an[i].addEventListener('click',function () {
        for (var k= 0;k<lunbo.length;k++){
            an[k].classList.remove('smh');
            lunbo[k].style.opacity="0";
            dt[k].style.display="none"
        }
        this.classList.add('smh');
        console.log(this.index);
        lunbo[this.index].style.opacity="1";
        dt[this.index].style.display="block"
    })
}


var told=document.querySelector('.told');
// position: fixed;
// z-index: 9999;
// background: white;
// top: 0;
window.onscroll = function () {
    if (document.documentElement.scrollTop >100 || document.body.scrollTop >100){
        told.style.position='fixed';
        told.style.zIndex='9999';
        told.style.background='#fff';
        told.style.top='0';
        told.style.width="100%";
        told.style.height="68px";
    }else {
        told.style.height="0";
        told.style.transition="0.2s";
        told.style.overflow="hidden";
    }
};


